<template>
  <div>
    <div class="reportY">
        <div class="reportHead">
            <img src="../assets/img/箭头.png" alt="" width="20px" height="20px" @click="go">
            <h3>借记卡挂失</h3>
        </div>
        <div class="reportFoot">
            <div class="reportFoot1">账户<p>{{cardNumber}}</p></div>
            <div class="reportFoot2">账户密码<input type="text" placeholder="请输入支付密码" v-model="mima"></div>
        </div>
        <button class="reportOk" @click="que">确定</button>
    </div>
  </div>
</template>

<script>
import {toThrow} from "../api/ReportLoss";
import { Dialog } from "vant";
export default {
    data(){
        return{
            cardNumber:this.$route.params.clip,
            mima:""
        }
    },
    methods:{
        go() {
      this.$router.push({
        name: "Debitcarddetails",
      });
    },
    que(){
      toThrow({"card_id":this.cardNumber,"password":this.mima,"ssid":"1"}).then((res)=>{
        if (res.code == 200) {
          console.log(this.mima);
          this.$router.push({
          name:"ReportOk"
         })
        }else{
          Dialog({ title: "温馨提示", message: res.msg });
        }   
      }).catch((err)=>{
          console.log(err);
         })
    }
    }

}
</script>

<style scoped src="../assets/css/ReportLoss.css">

</style>